package com.ruoyix.aicode.domain;

import lombok.Data;

import java.util.HashMap;
import java.util.Map;

/**
 * 页面风格设置
 */
@Data
public class PageStyle {
    private String colorScheme = "modern"; // modern, classic, dark, light, colorful
    private String layoutStyle = "clean";  // clean, dense, minimal, rich
    private String uiFramework = "bootstrap"; // bootstrap, tailwind, material
    private Map<String, String> colorVariables = new HashMap<>();
    private String fontFamily = "'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif";
    private String description = "现代简约风格，注重用户体验和视觉层次";

    public PageStyle() {
        // 默认颜色变量
        colorVariables.put("primary-color", "#3498db");
        colorVariables.put("secondary-color", "#2ecc71");
        colorVariables.put("accent-color", "#e74c3c");
        colorVariables.put("text-color", "#333333");
        colorVariables.put("light-bg", "#f8f9fa");
        colorVariables.put("dark-bg", "#343a40");
    }

    public String generateCssVariables() {
        StringBuilder css = new StringBuilder();
        css.append("    :root {\n");
        for (Map.Entry<String, String> entry : colorVariables.entrySet()) {
            css.append("      --").append(entry.getKey()).append(": ").append(entry.getValue()).append(";\n");
        }
        css.append("    }\n");
        return css.toString();
    }
}
